<template>
    <div>
        <swiper :swipelist="home_swipe"></swiper>
        <div class="mui-content">
            <ul class="mui-table-view mui-grid-view mui-grid-9">
                <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                    <router-link to="/home/newslist">
                        <span class="mui-icon-extra mui-icon-extra-grech"></span>
                        <div class="mui-media-body">游戏资讯</div>
                    </router-link>
                </li>
                <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                    <router-link to="/home/productlist">
                        <span class="mui-icon-extra mui-icon-extra-grech"></span>
                        <div class="mui-media-body">游戏列表</div>
                    </router-link>
                </li>
            </ul> 
		</div>
    </div>
</template>
<script>
    import axios  from 'axios'
    import swiper from '../public/swiper.vue'
    export default {
        data(){
            return {
                home_swipe:[]
            }
            
        },
        components: {
            swiper
        },
        methods:{
            // getInfo(){
            //     axios.get('src/json/home_swiper/home_swiper.json', {} , {emulateJSON: true}).then((response) => {
            //         console.log(response);
            //     }).catch(function (error) {
            //         console.log(error);
            //     });
            // }
        },
        mounted(){
            // this.$store.commit('show',(data)=>{
            //     console.log(data);
            //     data = data+"修改后的";
            //     return data
            // });
            // console.log("再次调用的数据："+this.$store.state.count);
            // console.log("数据:"+this.$store.state.count);
            axios.get('src/json/home_swiper.json', {} , {emulateJSON: true}).then((response) => {
                this.home_swipe = response.data.url;
            }).catch(function (error) {
                console.log(error);
            })
        }
        
    }
</script>
<style lang="less" scoped>
    .mint-swipe{
        height: 200px;
        .mint-swipe-item{
            img{
                max-width: 100%;
            }
        }
    }
</style>
